<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/system/mytable/Fk_subcompany.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/mytable/mytable/Fk_subcompany.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '子公司',
                name: 'mytable/Fk_subcompany',
                url: "/Fk_subcompany/",
                sortName: "id"
            });
            const editFormFields = ref({"subcompanyname":"","company_oa_id":""});
            const editFormOptions = ref([[{"title":"子公司名称","field":"subcompanyname","type":"text"},
                               {"title":"对应OAid","field":"company_oa_id","type":"number"}]]);
            const searchFormFields = ref({"subcompanyname":"","company_oa_id":""});
            const searchFormOptions = ref([[{"title":"子公司名称","field":"subcompanyname","type":"like"},{"title":"对应OAid","field":"company_oa_id","type":"text"}]]);
            const columns = ref([{field:'id',title:'id',type:'int',width:110,require:true,align:'left',sort:true},
                       {field:'subcompanyname',title:'子公司名称',type:'string',width:110,align:'left'},
                       {field:'company_oa_id',title:'对应OAid',type:'int',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
